package com.yunji.storage.service.impl;

import com.yunji.storage.bo.StorageRecordsListQueryBO;
import com.yunji.storage.dao.IStorageRecordsDao;
import com.yunji.storage.domain.StorageRecordsDO;
import com.yunji.storage.service.IStorageRecordsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.storage.service.impl
 * @Title: StorageRecordsServiceImpl
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-08-17 10:45:46      V1.0        HuaAo       新建类
 */
@Service
public class StorageRecordsServiceImpl implements IStorageRecordsService {

    @Resource
    IStorageRecordsDao storageRecordsDao;

    @Override
    public List<StorageRecordsDO> search(StorageRecordsListQueryBO bo) {
        return storageRecordsDao.search(bo);
    }

    @Override
    public boolean create(StorageRecordsDO storageRecords) {
        return storageRecordsDao.save(storageRecords);
    }

    @Override
    public boolean update(StorageRecordsDO storageRecords) {
        return storageRecordsDao.updateById(storageRecords);
    }

    @Override
    public boolean deleteByTicketIds(Long... ticketIds) {
        return storageRecordsDao.deleteByTicketIds(ticketIds);
    }

    @Override
    public void saveBatch(List<StorageRecordsDO> recordsList) {
        storageRecordsDao.saveBatch(recordsList);
    }
}